package com.crazymaker.springcloud.demo.start;


import com.crazymaker.springcloud.standard.config.FeignConfiguration;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration;
import org.springframework.cloud.netflix.hystrix.EnableHystrix;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

@SpringBootApplication(scanBasePackages =
        {"com.crazymaker.springcloud.demo",
                "com.crazymaker.springcloud.standard",
                "com.crazymaker.springcloud.base",
                "com.crazymaker.springcloud.user.info.remote.fallback"
        }, exclude = {SecurityAutoConfiguration.class})
@EnableScheduling
@EnableSwagger2
@EnableJpaRepositories(basePackages = {"com.crazymaker.springcloud.seckill.dao"})
@EntityScan(basePackages = {"com.crazymaker.springcloud.seckill.dao.po", "com.crazymaker.springcloud.standard.*.dao.po"})
@EnableHystrix
@EnableFeignClients(basePackages = "com.crazymaker.springcloud.user.info.api.client", defaultConfiguration = FeignConfiguration.class)
@EnableTransactionManagement
public class DemoCloudApplication
{


    public static void main(String[] args)
    {
        SpringApplication.run(DemoCloudApplication.class, args);
    }

}
